package com.jiaai.live.api;

import com.jiaai.exception.ServerException;
import com.jiaai.live.model.AnchorQueryVO;
import com.jiaai.live.model.BAnchor;
import com.jiaai.live.model.VAnchorInfo;
import com.jiaai.member.model.BMemberIdentity;

import java.util.List;
import java.util.Map;
import java.util.TreeMap;

/**
 * <p>
 * TODO
 * </p>
 *
 * @author 佳爱网络科技
 * @version V1.0
 * @title IAnchorApi
 * @since 2017/10/19
 */
public interface IAnchorApi {
    /**
     *返回主播状态
     * @param mId
     * @return
     */
    Integer  checkAnchor(String mId)throws ServerException;

    /***
     * 根据会员Id获取主播祥情
     * @param mId
     * @return
     * @throws ServerException
     */
    VAnchorInfo getInfoByMId(String mId)throws  ServerException;

    /**
     * 申请主播
     * @param mId
     * @param bAnchor
     * @throws ServerException
     */
    void applyAnchor(String mId,BAnchor bAnchor)throws  ServerException;

    Object getAll(Integer curr, AnchorQueryVO vo);

    Map oneInfo(String anchorId);

    /**
     * 改变主播直播状态
     * @param status
     * @throws ServerException
     */
    void checkAnchorStatus(String anchorId, Integer status) throws  ServerException;

    /**
     * 改变主播申请资料状态
     * @param passStatus
     * @throws ServerException
     */
    void checkAnchorPassStatus(String anchorId, Integer passStatus) throws  ServerException;

    /**
     * //统计新增主播
     * @return
     */
    TreeMap tongjiNewAnchor();

    /**
     * //我的直播记录
     * @param curr
     * @param anchorId
     * @param startTime
     * @param endTime
     * @return
     */
    Object myLive(Integer curr, String anchorId, String startTime, String endTime);

    /**
     * //搜索页面的男神女神和推荐
     * @return
     */
    Object recommand();

    /**
     * //检查我的主播信息
     * @param mId
     * @return
     */
    BAnchor checkMyAnchor(String mId);

    /**
     * 加载排行榜
     * @param type
     * @return
     * @throws ServerException
     */
    public List<Map<String,Object>> findRanking(String type)throws  ServerException;

    /**
     * 搜索主播
     * @param key 昵称或mId
     * @return
     */
    Object searchAnchor(String key);


    /**
     * 主播认证
     * @param mId
     * @param bMemberIdentity
     * @return
     * @throws ServerException
     */
    Object identity(String mId,BMemberIdentity bMemberIdentity)throws  ServerException;


    /**
     * 保存拒绝主播的理由
     * @param refuse
     * @throws ServerException
     */
    void saveRefuse(String anchorId, String refuse,Integer passStatus) throws  ServerException;
}
